package com.jthinking.test;

import com.google.protobuf.ByteString;
import com.jthinking.test.proto.ImageProto;

import java.io.FileInputStream;
import java.io.IOException;

/**
 * Hello world!
 */
public class App {
    public static void main(String[] args) {
        System.out.println("Hello World!");

        ImageProto.Image.Builder builder = ImageProto.Image.newBuilder();
        builder.setName("");
        builder.setSize(111L);
        try {
            builder.setFileBytes(ByteString.readFrom(new FileInputStream("D:/test.jpg")));
        } catch (IOException e) {
            e.printStackTrace();
        }
        //return builder.build().toByteArray();

    }
}
